package top.yzlin.jqueryjx3strategystation.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import top.yzlin.jqueryjx3strategystation.entity.community.Comment;

import java.util.List;

@Repository
public interface CommentDAO extends JpaRepository<Comment,Integer> {


    @Query("from Comment where article.articleId=?1")
    List<Comment> findCommentByArticleId(Integer articleId);

}
